package org.blog.com.spring_blog.config;

import org.blog.com.spring_blog.model.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@ResponseBody
public class ExceptionAdvice {
    @ExceptionHandler
    public Object handel(Exception e){
        return Result.fail("内部错误");
    }
}
